'use strict';

/** @type {import('sequelize-cli').Migration} */
module.exports = {
  async up (queryInterface, Sequelize) {
    await queryInterface.bulkInsert('Users', [
      {
        email: 'admin@admin.com',
        username: 1,
        password: 'admin',
        nickname: '管理员',
        avatar: 'https://cdn.jsdelivr.net/gh/xugaoyi/image_repo@master/blog/avatar1.png',
        role: 100,
        sex: 1,
        company: '公司1',
        introduce: '介绍1',
        createdAt: new Date(),
        updatedAt: new Date()
      },
      {
        email: 'user@user2.com',
        username: 2,
        password: 'user',
        nickname: '用户q',
        avatar: 'https://cdn.jsdelivr.net/gh/xugaoyi/image_repo@master/blog/avatar2.png',
        role: 1,
        sex: 1,
        company: '公司1',
        introduce: '介绍1',
        createdAt: new Date(),
        updatedAt: new Date()
      },
      {
        email: 'user@user1.com',
        username: 3,
        password: 'user',
        nickname: '用户1',
        avatar: 'https://cdn.jsdelivr.net/gh/xugaoyi/image_repo@master/blog/avatar3.png',
        role: 2,
        sex: 0,
        company: '公司2',
        introduce: '介绍2',
        createdAt: new Date(),
        updatedAt: new Date()
      }
    ], {});

  },

  async down (queryInterface, Sequelize) {
   await queryInterface.bulkDelete('Users', null, {});
  }
};
